<style type="text/css">
.fui-navbar ~ .fui-content, .fui-content.navbar{padding-bottom:0;}
.order-detail-page .order-status .title {color:#ff9326}
.order-detail-page .order-status .text {color:#ff9326}
.order-detail-page .info-cell-group .fui-cell {
    padding: 0.3rem;
}
</style>
<link rel="stylesheet" type="text/css" href="../addons/jy_weishop/custom/templates/mobile/css/orderdetail.css?v=2.1.5">
<div class='fui-page cav order_detail'>
	<div class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">订单详情</div>
				<div class="fui-header-right" onclick="location.href='{php echo mobileUrl('groups/orders')}'">
					<span class="icon icon-order" style="font-size:1.1rem;"></span>
				</div>
			</div>
	 </div>
	<div class='fui-content jy2-headertop'>
		<div class='fui-list-group result-list' style="background:none">
			<div class='fui-list order-status' style="background:none;">
				<div class='fui-list-inner'>
					<div class='title'> {{pagedata.order.statustitle}}</div>  										
					<div class='text'>订单金额(含运费): ¥ {{pagedata.order.price}}<span></div>
				</div>
				<div class='fui-list-media'>
					<i ng-if="empty(pagedata.order.status) && pagedata.order.paytype==3" class='icon icon-deliver'></i>
					
					<i ng-if="empty(pagedata.order.status) && pagedata.order.paytype!=3" class='icon icon-information'></i>
					
					
					<i ng-if="pagedata.order.status==1" class='icon icon-money'></i>
				
					<i ng-if="pagedata.order.status==2" class='icon icon-deliver'></i>
					
					<i ng-if="pagedata.order.status==3" class='icon icon-check'></i>
					
					<i ng-if="pagedata.order.status==-1" class='icon icon-roundclose'></i>
				</div>
			</div>
		</div>
		<div ng-if="pagedata.address.id && pagedata.order.sendtype==1" class='fui-list-group' style='margin-top:5px;'>		
			<a ng-if="pagedata.order.status==2||pagedata.order.status==3">
				<div class='fui-list'>
					<div class='fui-list-media'><i class='icon icon-deliver'></i></div>
					<div class='fui-list-inner'>
						
						<div ng-if="!pagedata.express" class='text'><span>快递公司:{{pagedata.order.expresscom}}</span></div>
						<div ng-if="!pagedata.express" class='text'><span>快递单号:{{pagedata.order.expresssn}}</span></div>
						
						<div ng-if="pagedata.express" class='text'><span class='text-danger'>{{pagedata.express.step}}</span></div>
						<div ng-if="pagedata.express" class='text'><span class='text-danger'>{{pagedata.express.time}}</span></div>
					
					</div>
					<div class='fui-list-angle'><span class='angle'></span></div>
				</div>
			</a>
			<div class='fui-list'>
				<div class='fui-list-media'><i class='icon icon-location'></i></div>
				<div class='fui-list-inner'>
					<div class='title'>{{pagedata.address.realname}} {{pagedata.address.mobile}}</div>
					<div class='text'>{{pagedata.address.province}}{{pagedata.address.city}}{{pagedata.address.area}} {{pagedata.address.address}}</div>
				</div>
			</div>
		</div>		
		<div ng-if="pagedata.carrier || pagedata.store.id" class='fui-list-group' style='margin-top:5px;'>
			<div class='fui-list'>
				<div class='fui-list-media'><i class='icon icon-person2'></i></div>
				<div class='fui-list-inner'>
					<div class='title'>{{pagedata.carrier.carrier_realname}} {{pagedata.carrier.carrier_mobile}}</div>
				</div>
			</div>
			<div ng-if="pagedata.store.id>0" class="fui-list store-item" >
				<div class="fui-list-media">
					<i class='icon icon-shop'></i>
				</div>
				<div class="fui-list-inner store-inner">
					<div class="title"> <span class='storename'>{{pagedata.store.title}}</span></div>
					<div class="text">
						<span class='realname'>{{pagedata.store.realname}}</span> <span class='mobile'>{{pagedata.store.mobile}}</span>
					</div>
					<div class="text">
						<span class='address'>{{pagedata.store.address}}</span>
					</div>
				</div>
				<div ng-if="pagedata.store.id>0" class="fui-list-angle ">
					<a ng-if="pagedata.store.tel" href="tel:{$store['tel']}" class='external '><i class=' icon icon-phone' style='color:green'></i></a>
				</div>
			</div>
		</div>
<div class="fui-list-group goods-list-group">
	<a href="javascript:;" ng-click="access_json('jy_aligroup/goods//id='+pagedata.goods.id)" class="external">
		<div class="fui-list goods-list" style="background:none;">
			<div class="fui-list-media">
				<img src="{{tomedia(pagedata.goods.image)}}" alt="{{pagedata.goods.title}}" class="round">
			</div>
			<div class="fui-list-inner">
				<div class="text goodstitle">{{pagedata.goods.title}}</div>
				<div class="subtitle">{{pagedata.goods.subtitle || '无商品描述！'}}</div>
				<div ng-if="pagedata.good.optionid" class='subtitle'>{{pagedata.goods.optiontitle}}</div>
			</div>
			<div class='fui-list-angle'>
				¥ <span class='price'>{{ifelse(pagedata.order.is_team==1,pagedata.group.group_price,pagedata.goods.price)}}/{{pagedata.good.units||'件'}}
				<br/>   x 1</span>
			</div>
		</div>
	</a>
</div>
		<div ng-if="pagedata.order.virtual && pagedata.order.virtual_str" class='fui-according-group'>
			<div class='fui-according expanded'>
				<div class='fui-according-header'>
					<i class='icon icon-productfeatures'></i>
					<span class="text">发货信息</span>
					<span class="remark"></span>
				</div>
				<div class="fui-according-content">
					<div class='content-block'>
						{{pagedata.order.virtual_str}}
					</div>
				</div>
			</div></div>
		
		<div ng-if="pagedata.order.isvirtualsend && pagedata.order.virtualsend_info" class='fui-according-group'>
			<div class='fui-according expanded'>
				<div class='fui-according-header'>
					<i class='icon icon-productfeatures'></i>
					<span class="text">发货信息</span>
					<span class="remark"></span>
				</div>
				<div class="fui-according-content">
					<div class='content-block'>
						{{pagedata.order.virtualsend_info}}
					</div>
				</div>
			</div></div>
		<div ng-if="pagedata.order.isverify==1 && pagedata.order.status > 0 && (pagedata.order.success == 1 || pagedata.order.is_team == 0)" class='fui-according-group expanded verify-container' data-verifytype="{$order['verifytype']}" data-orderid="{$order['id']}">
			<div class='fui-according'>
				<div class='fui-according-header'>
					<i class='icon icon-list'></i>
					<span class="text">核销码</span>
					<span class="remark"><div class="badge">1</div></span>
				</div>
				<div class="fui-according-content verifycode-container">
					<div class='fui-cell-group'>
						<div class='fui-cell verify-cell' data-verifycode="{$v['verifycode']}">
							<div class='fui-cell-label' style='width:auto'>
								{{pagedata.order.verifycode}}
							</div>
							<div class='fui-cell-info'></div>
							<div class='fui-cell-remark noremark'>
							
								<div ng-if="pagedata.verify.isverify==1" class='fui-label fui-label-danger' >已使用</div>
					
									
										<div ng-if="pagedata.verify.isverify!=1 && pagedata.order.verifytype==1 && pagedata.verifynum==0" class='fui-label fui-label-danger' >已使用</div>
								
										<div ng-if="pagedata.verify.isverify!=1 && pagedata.order.verifytype==1 && pagedata.verifynum!=0" class='fui-label fui-label-default' >剩余{php echo $verifynum} 次</div>
									
								
								<div ng-if="pagedata.verify.isverify!=1 && pagedata.order.verifytype!=1" class='fui-label fui-label-default' >未使用</div>
								
								
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<script language='javascript' src='https://api.map.baidu.com/api?v=2.0&ak=ZQiFErjQB7inrGpx27M1GR5w3TxZ64k7&s=1'></script>
		<div ng-if="pagedata.stores" class='fui-according-group'>
			<div class='fui-according'>
				<div class='fui-according-header'>
					<i class='icon icon-shop'></i>
					<span class="text">适用门店</span>
					<span class="remark"><div class="badge">{{count(pagedata.stores)}}</div></span>
				</div>
				<div class="fui-according-content store-container">
					
					<div ng-repeat="item in pagedata.stores"  class="fui-list store-item"
						  data-lng="{php echo floatval($item['lng'])}"
						  data-lat="{php echo floatval($item['lat'])}">
						<div class="fui-list-media">
							<i class='icon icon-shop'></i>
						</div>
						<div class="fui-list-inner store-inner">
							<div class="title"> <span class='storename'>{{item.title}}</span></div>
							<div class="text">
								<span class='realname'>{{item.realname}}</span> <span class='mobile'>{{item.mobile}}</span>
							</div>
							<div class="text">
								<span class='address'>{{item.address}}</span>
							</div>
							<div class="text location" style="color:green;display:none">正在计算距离...</div>
						</div>
						<div class="fui-list-angle ">
							<a ng-if="!empty(item.tel)" href="tel:{{item.tel}}" class='external '><i class=' icon icon-phone' style='color:green'></i></a>
							<a href="javascript:;" ng-click="access_json('jy_aligroup/map//id='+item.id)" href="{php echo mobileUrl('store/map',array('id'=>$item['id']))}" class='external' ><i class='icon icon-location' style='color:#f90'></i></a>
						</div>
					</div>
					
				</div>
				<div id="nearStore" style="display:none">
					<div class='fui-list store-item'  id='nearStoreHtml'></div>
				</div>
			</div></div>
		
		<div class='fui-cell-group price-cell-group'>
			<div class="fui-cell">
				<div class="fui-cell-label">商品小计</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark">¥ {{pagedata.order.price}}</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label">运费</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark">¥ {{pagedata.order.freight}}</div>
			</div>
			
			<div ng-if="pagedata.order.discount>0" class="fui-cell">
				<div class="fui-cell-label">团长优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark">
					- ¥ {{pagedata.order.discount}}
				</div>
			</div>
			<div ng-if="pagedata.order.discountprice>0" class="fui-cell">
				<div class="fui-cell-label">会员优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark">-¥ {{pagedata.order.discountprice}}</div>
			</div>
			
			
			<div ng-if="pagedata.order.isdiscountprice>0" class="fui-cell">
				<div class="fui-cell-label">促销优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark">-¥ {{pagedata.order.isdiscountprice}}</div>
			</div>
		
			
			<div ng-if="pagedata.order.creditmoney>0" class="fui-cell">
				<div class="fui-cell-label">积分抵扣</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark">- ¥ {{pagedata.order.creditmoney}}</div>
			</div>
			
			
			<div ng-if="pagedata.order.deductcredit2>0" class="fui-cell">
				<div class="fui-cell-label">余额抵扣</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark">-¥{{pagedata.order.deductcredit2}}</div>
			</div>
		
			<div class="fui-cell">
				<div class="fui-cell-label" style='width:auto;'>实付费(含运费)</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark"><span class='text-danger'>¥ <span style='font-size:.8rem'>{{pagedata.order.price}}</span></span></div>
			</div>
		</div>
		<div ng-if="pagedata.order.verifycode" class="fui-cell-group">
				<a class="fui-cell"  href="javascript:;">
						<div class="fui-cell-icon"><i class="icon jinyunicon icon-saoyisao2"></i></div>
						<div class="fui-cell-text"><p>核销码</p></div>
						<div class="fui-cell-remark noremark"><i class="icon icon-moreunfold"></i></div>
				</a>
				<div  class="fui-cell lineblock">
						<div class="fui-cell-info">
								核销码:{{pagedata.order.verifycode}}
						</div>
						<div class="fui-cell-remark noremark">									
								<div ng-show="pagedata.order.verify.lastverifys<1" class='fui-label fui-label-danger'>次数已用完</div>											
								<div ng-show="pagedata.order.verify.lastverifys>0" ng-click="pagedata.show_verify(pagedata.order.verify.url,pagedata.order.verify.verifycode)" class='fui-label fui-label-default order_detail_code' >点击使用</div>												
								<div ng-show="pagedata.order.verify.lastverifys>0" class='fui-label fui-label-default' >剩余{{pagedata.order.verify.lastverifys}}次</div>
						</div>
				</div>	
		</div>
		<div class="fui-cell-group info-cell-group">
			<div class="fui-cell">
				<div class="fui-cell-label">订单编号:</div>
				<div class="fui-cell-info">{{pagedata.order.orderno}}</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label">创建时间:</div>
				<div class="fui-cell-info">{{pagedata.order.createtime}}</div>
			</div>
			<div ng-if="pagedata.order.status>=1&& pagedata.order.status<4" class="fui-cell">
				<div class="fui-cell-label">支付时间: </div>
				<div class="fui-cell-info">{{pagedata.order.paytime}}</div>
			</div>
			<div ng-if="pagedata.order.refundtime" class="fui-cell">
				<div class="fui-cell-label">退款时间: </div>
				<div class="fui-cell-info">{{pagedata.order.refundtime}}</div>
			</div>
			
			<div ng-if="pagedata.order.status==3" class="fui-cell">
				<div class="fui-cell-label">发货时间: </div>
				<div class="fui-cell-info">{{pagedata.order.sendtime}}</div>
			</div>
			<div ng-if="pagedata.order.status==3" class="fui-cell">
				<div class="fui-cell-label">完成时间: </div>
				<div class="fui-cell-info">{{pagedata.order.finishtime}}</div>
			</div>
		</div>
		<div class="mask">
			<div class="code_box">
				<p>请将二维码出示给核销员</p>
				<div class="img_box" id="show_verify_ewm">
					
				</div>
				<div class="cav_code" id="show_verify_code"></div>
				<div class="error">
					<p style="padding: 0 1.3rem">温馨提示：为了更好的保护您利益,请不要轻易将您的核销二维码泄露给他人</p>
				</div>
			</div>
		</div>
	</div>
	<div class='fui-footer'>
		<a ng-if="pagedata.order.status==0" class="btn btn-sm btn-danger" href="javascript:;" ng-click="pay_submit({},'jy_aligroup/order/pay/id='+pagedata.order.id,'jy_aligroup/order/','jy_aligroup/order/')">支付订单</a>	
		<div ng-if="pagedata.order.isverify==1 && pagedata.order.status>0 && (pagedata.order.success==1 || pagedata.order.is_team==0) && pagedata.verifynum>0" class="btn btn-sm btn-default btn-default-o pull-left order-verify" style="margin-left:.5rem;" >
			<i class="icon icon-qrcode"></i>
			<span>我要使用</span>
		</div>
		<div ng-if="pagedata.order.status==5 || pagedata.order.status==4" class="btn btn-sm btn-default btn-default-o order-delete">删除订单</div>
		<div ng-if="pagedata.order.status==3" class="btn btn-sm btn-default btn-default-o order-finish">确认收货</div>
		<a ng-if="pagedata.order.refundstate>0 && pagedata.refund.refundstatus!=5" class='btn btn-sm btn-default-o btn-cancel'>取消申请</a>
		
	</div>
</div>
<script type="text/javascript">
scope.pagedata.show_verify=function(url,code){
			scope.tool.qr(url,'show_verify_ewm',150)
			$('#show_verify_code').text(code);
			$('.mask').css({display:'block'});
}	
$('.mask').click(function(){
			$(this).css({display:'none'})
})
	</script>